import Layout from '@/layout'
import RouteButtonsBuilder from '@/framework/infra/router/RouterButtonsBuilder'
import TableButtonType from '@/framework/constant/TableButtonType'

export default [
  {
    path: '/ems',
    component: Layout,
    meta: { title: '快递查询', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'sign',
        component: () => import('@/feature/ems/app/sign/index'),
        meta: { title: '快递查询', icon: 'table' },
        buttons: RouteButtonsBuilder.builder('ems:sign')

          .addButtons([
            {
              handler: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建',
              icon: 'el-icon-plus'
            },
            {
              handler: 'import',
              type: TableButtonType.TOOLBAR,
              label: '批量导入',
              buttonType: 'danger',
              icon: 'el-icon-upload'
            },
            {
              handler: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }
          ])
          .build()
      }
      // #appendSpot# 生成工具用，不要删了
    ]
  }
]
